-- GENERATED SPELL FOR [Shartuul] --


function spell0_23230(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(41958,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23230', 22500, 1)
end

function spell1_23230(pUnit, Event) --@Incinerate,n/a--
pUnit:FullCastSpellOnTarget(41960,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23230', 7000, 1)
end

function spell2_23230(pUnit, Event) --@Magnetic Pull,n/a--
pUnit:FullCastSpellOnTarget(41959,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23230', 500, 1)
end

function spell3_23230(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(41957,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23230', 2000, 1)
end

function spell4_23230(pUnit, Event) --@Shadow Resonance,n/a--
pUnit:FullCastSpellOnTarget(41961,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23230', 30288, 1)
end

function Sorts_23230(pUnit, Event)
local choix_sorts_23230 = math.random(0, 4)
if choix_sorts_23230 == 0 then
pUnit:RegisterEvent('spell0_23230', 1, 1)
end
if choix_sorts_23230 == 1 then
pUnit:RegisterEvent('spell1_23230', 1, 1)
end
if choix_sorts_23230 == 2 then
pUnit:RegisterEvent('spell2_23230', 1, 1)
end
if choix_sorts_23230 == 3 then
pUnit:RegisterEvent('spell3_23230', 1, 1)
end
if choix_sorts_23230 == 4 then
pUnit:RegisterEvent('spell4_23230', 1, 1)
end
end

function mob23230_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23230', math.random(1500, 3000), 1)
end

function mob23230_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23230_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23230_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23230, 1, 'mob23230_Action')
RegisterUnitEvent(23230, 2, 'mob23230_Leave')
RegisterUnitEvent(23230, 3, 'mob23230_Kill')
RegisterUnitEvent(23230, 4, 'mob23230_Die')
